package com.github.fashionbrot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.fashionbrot.entity.TableColumnEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TableMapper  {

    List<TableColumnEntity> queryColumns(@Param("sql") String sql);

    @Select("SELECT name FROM sqlite_master WHERE type='table' order by name")
    List<String> queryTables();
}
